#include "drv_led.h"
#include "drv_beep.h"
#include "drv_systick.h"
#include "drv_key.h"

static uint8_t key_status=0;

int main(void)
{
    drv_led_init();
    drv_beep_init();
	drv_systick_init(168);
	drv_key_init();
   
    while(1)
    {     
        if(drv_key_get())
        {
        	key_status=~key_status;
        }
		if(key_status)
		{
			drv_led_open();
		}
		else
		{
			drv_led_close();
		}
    }
    
}
